package com.homework.Homework04;

//设计父类——员工类，子类：工人类(Worker)，农民类(Farmer)，
// 教师类(Teacher)，科学家类(Scientist)，服务生类(Waiter)
//(1)其中工人，农民，服务生只有基本工资 sal
//(2)教师除基本工资外，还有课酬（元/天） classDay,classSal
//(3)科学家除基本工资外，还有年终奖 bonus
//(4)编写一个测试类，将各种类型的员工的全年工资打印出来
public class Homework04 {
    public static void main(String[] args) {
        Worker worker = new Worker("jack", 5000);
        worker.printSal();
        Peasant smith = new Peasant("smith", 3000);
        smith.printSal();
        Waiter tom = new Waiter("tom", 4000);
        tom.printSal();
        Teacher lisa = new Teacher("lisa", 10000);
        lisa.setClassDay(300);
        lisa.setClassSal(1000);
        lisa.printSal();
        Scientist peter = new Scientist("peter", 20000);
        peter.setBonus(500000);
        peter.printSal();


    }
}
